using System;
using System.Collections.Generic;
using System.Security.Policy;

namespace DataAccess.Entities
{
    public class Profile
    {
        public virtual int Id { get; private set; }
        public virtual Boolean Complete { get; set; }
        public virtual Account Account { get; set; }
        public virtual Interest Passion { get; set; }
        public virtual Url Picture { get; set; }
        public virtual String Url { get; set; }
        public virtual string Bio { get; set; }
        public virtual DateTime Birthday { get; set; }
        public virtual string Status { get; set; }
        public virtual IList<Interest> Interests { get; set; }
        public virtual Gender Gender { get; set; }
        public virtual RelationshipStatus RelationshipStatus { get; set; }
        public virtual Gender InterestedIn { get; set; }
        public virtual IList<String> FavEntertainment { get; set; }
        public virtual IList<String> FavFood { get; set; } 

        // PORTFOLIO
        public virtual IList<Media> Media { get; set; }
        public virtual IList<Discussion> Discussions { get; set; }
        public virtual IList<Comment> Comments { get; set; }
        public virtual IList<Event> Events { get; set; } 

        public Profile()
        {
            Interests = new List<Interest>();
            FavEntertainment = new List<String>();
            FavFood = new List<String>();
            Media = new List<Media>();
            Discussions = new List<Discussion>();
            Comments = new List<Comment>();
            Events = new List<Event>();
        }

        public virtual void AddInterest(Interest interest)
        {
            interest.Profiles.Add(this);
            Interests.Add(interest);    
        }

        public virtual void AddEntertainment(String entertainment)
        {
            FavEntertainment.Add(entertainment);    
        }

        public virtual void AddFood(String food)
        {
            FavFood.Add(food);    
        }

        public virtual void AddMedia(Media media)
        {
            media.Owner = Account;
            Media.Add(media);
        }

        public virtual void AddDiscussion(Discussion discussion)
        {
            discussion.Owner = Account;
            Discussions.Add(discussion);
        }

        public virtual void AddComment(Comment comment)
        {
            comment.Owner = Account;
            Comments.Add(comment);
        }

        public virtual void AddEvent(Event eventItem)
        {
            eventItem.Owner = Account;
            Events.Add(eventItem);
        }
    }
}